<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: YanHilin
  Date: 2020/5/13
  Time: 16:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>我的收藏夹</title>
    <base href="http://localhost:8080/onlineflower/">
    <%@include file="/page/comment/head.jsp"%>
    <style>
        #center{
            margin: auto auto;
            width: 80%;
        }
    </style>
</head>
<body>
<%@include file="/page/user/head_nav.jsp"%>
<c:if test="${empty requestScope.collects}">
    <h1>暂无收藏</h1>
    <h4><a href="page/user/index.jsp">去逛逛</a></h4>
</c:if>
<c:if test="${not empty requestScope.collects}">
    <div id="center">
        <c:forEach items="${requestScope.collects}" var="item">
            <div class="card">
                <div class="card-header">编号：${item.collectid} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用户编号：${item.userid}</div>
                <div class="card-body">
                    <h5 class="card-title">鲜花：${item.flower_name}</h5>
                        <%--<p class="card-text">鲜花编号：${item.flowerid}</p>--%>
                    <img src="static/picFlower/${item.flower_photo}" alt="照片" style="height:200px;width: 200px">
                    <a href="client/flowerServlet?action=showFlowerDetail&flowerid=${item.flowerid}" class="btn btn-dark">点击查看</a>
                    <a class="btn btn-dark" href="collectServlet?action=delete&collectid=${item.collectid}">移出收藏夹</a>

                </div>
                <div class="card-footer">${item.createtime}</div>
            </div><br/>
        </c:forEach>
    </div>
</c:if>

</body>
</html>
